package com.front.web.lvyou_specialty_front;

import com.bootdo.lvyou.service.LvyouMemberService;
import com.bootdo.lvyou.service.XcxConfigService;
import com.bootdo.lvyou_specialty.service.*;
import com.bootdo.system.service.UserService;
import com.bootdo.wx.service.ConfigService;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.HashMap;
import java.util.Map;

public class LvyouSpecialtySuperController {
    @Autowired
    protected LvyouSpecialtyMenuService lvyouSpecialtyMenuService;

    @Autowired
    protected LvyouSpecialtyProductService lvyouSpecialtyProductService;

    @Autowired
    protected LvyouSpecialtyMerchantService lvyouSpecialtyMerchantService;

    @Autowired
    protected LvyouSpecialtyProductArticleService lvyouSpecialtyProductArticleService;

    @Autowired
    protected LvyouSpecialtyOrderAllService lvyouSpecialtyOrderAllService;

    @Autowired
    protected LvyouSpecialtyOrderContentService lvyouSpecialtyOrderContentService;

    @Autowired
    protected LvyouSpecialtyOrderPartService lvyouSpecialtyOrderPartService;

    @Autowired
    protected LvyouSpecialtyUserAddressService lvyouSpecialtyUserAddressService;

    @Autowired
    protected LvyouMemberService lvyouMemberService;

    @Autowired
    protected AmqpTemplate amqpTemplate;

    @Autowired
    protected XcxConfigService xcxConfigService;

    @Autowired
    protected UserService userService;

    @Autowired
    protected LvyouSpecialtyGzhConfigService lvyouSpecialtyGzhConfigService;

    @Autowired
    protected ConfigService configService;

    // 公用方法
    protected Map<String, Object> getPageNo(Integer pageNo, Integer pageSize) {
        Map<String, Object> param = new HashMap<>();
        int offset = (pageNo -1) * 15;
        param.put("offset", offset);
        if (pageSize == null) {
            param.put("limit", 15);
        } else {
            param.put("limit", pageSize);
        }
        return param;
    }

}
